<?php
session_start();
mysql_connect("localhost", "sapmenet_admin", "a1s2d3f4g5h6j7") or die ("Problem with datebase");
mysql_select_db("sapmenet_users"); 
$albumID = $_SESSION['jalbum'];
$pictures=",";
$snimki=mysql_query("SELECT ID FROM pictures WHERE album={$albumID}");
while ($result=mysql_fetch_array ($snimki, MYSQL_NUM))
{
	$pictures=$pictures.$result[0].",";
}
echo ($pictures);
?>